/**
 * 
 */
package br.ufrgs.inf.cwsmart.matcher;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import br.ufrgs.inf.cwsmart.exception.FrameworkException;

/**
 * Interface that defines the methods to get CWS properties
 *  
 * @author Rodrigo S Lumertz
 *
 */
public abstract class CWSProperties {

	/**
	 * The CWS Attributes
	 */
	protected Map<String, String> mapAttribute;
	
	/**
	 * The CWS Functionalities
	 */
	protected List<String> lstFunctionality;
	
	/**
	 * The constructor
	 */
	public CWSProperties() {
		this.mapAttribute = new HashMap<String, String>();
		this.lstFunctionality = new ArrayList<String>();
	}
		
	
	/**
	 * This method gets the functionalities of a CWS through
	 * its description file
	 * 
	 * @return A map with the functionalities of the CWS
	 */
	public List<String> getFunctionalities() {
		
		return this.lstFunctionality;
	}
	
	/**
	 * This method gets some properties, useful to the checkRule
	 * method, of a CWS through its description file.
	 * 
	 * @return A map with the properties of the CWS
	 */	
	public Map<String, String> getAttributes() {
		
		return this.mapAttribute;
	}
	
	/**
	 * Algorithm that parses a cws desciption.
	 * 
	 * @param cwsPath
	 * @throws FrameworkException
	 */
	public abstract void parse(String cwsPath)
		throws Exception;
}
